#include "guiterm.hpp"
#ifndef SCROLLABLECHARACTERVIEW_HPP
#define SCROLLABLECHARACTERVIEW_HPP

class ScrollableTermView
	:public JobViewSegment
{
	Q_OBJECT
public:
	ScrollableTermView(RemoteJob *job, TerminalEmulator *model, CharacterViewConfig *viewSettings, bool abridged);
	~ScrollableTermView();
	
	void finished();
	static pair<int,int> charsFromPixelSize(pair<int,int> pixelSize, CharacterViewConfig *viewSettings);
	
	QSize sizeHint() const;
	TerminalEmulator *getModel();
	void finalizeSize();
	
protected slots:
	void scrollbarChanged(int min, int max, int value);
	void scrollbarMoved(int value);
	
protected:
	QHBoxLayout *layout;
	ScrollBarPlaceholder *scrollbarPlaceholder;
	QScrollBar *scrollbar;
	bool scrollbarVisible;
	bool updatingScrollbar;
	
	TerminalEmulator *model;
	CharacterView *view;
};

#endif
